<template>
	<view>
		<nav-bar></nav-bar>
		<view class="djsidj">
			<view style="padding-top: 6%;"><image style="width:62px;height:62px;" src="../../static/mine-user.png"></image></view>
			<view v-if="!token" class="flex justify-center" style="font-size: 16px;font-weight: 400;color: #FFFFFF;" @click="goOut">立即登录</view>
			<view v-if="token"><view class="flex-1 items-center" style="font-size: 16px;font-weight: 700;color: #cf0000;" @click="goOut">退出登录</view></view>
		</view>
		<view style="padding:0 16px;">
			<view class="flex" style="height:43px;border-bottom:solid 1px #FAFAFC;" @click="tips">
				<view class="flex justify-center items-center" style="width:20px;"><image style="width:16px;height:16px;" src="../../static/my-project.png"></image></view>
				<view class="flex-1 flex items-center" style="font-size: 16px;font-weight: 400;color: #000000;">我的项目</view>
				<view class="flex justify-center items-center" style="width:10px;color: #797979;">></view>
			</view>
			<view class="flex" style="height:43px;border-bottom:solid 1px #FAFAFC;" @click="tips">
				<view class="flex justify-center items-center" style="width:20px;"><image style="width:16px;height:16px;" src="../../static/my-park.png"></image></view>
				<view class="flex-1 flex items-center" style="font-size: 16px;font-weight: 400;color: #000000;">我的园区</view>
				<view class="flex justify-center items-center" style="width:10px;color: #797979;">></view>
			</view>
			<view class="flex" style="height:43px;border-bottom:solid 1px #FAFAFC;" @click="tips">
				<view class="flex justify-center items-center" style="width:20px;"><image style="width:16px;height:16px;" src="../../static/my-account.png"></image></view>
				<view class="flex-1 flex items-center" style="font-size: 16px;font-weight: 400;color: #000000;">我的账户</view>
				<view class="flex justify-center items-center" style="width:10px;color: #797979;">></view>
			</view>
			<!-- <view class="flex" style="height:43px;border-bottom:solid 1px #FAFAFC;" v-if="token">
				<view class="flex justify-center items-center" style="width:20px;"><image style="width:16px;height:16px;" src="../../static/logout.png"></image></view>
				<view class="flex-1 flex items-center" style="font-size: 16px;font-weight: 400;color: #000000;" @click="goOut">退出登录</view>
				<view class="flex justify-center items-center" style="width:10px;color: #797979;">></view>
			</view> -->
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			show: false,
			token: localStorage.getItem('token')
		};
	},
	methods: {
		goOut() {
			localStorage.removeItem('token');
			uni.navigateTo({
				url: '/pages/login/login'
			});
		},
		tips() {
			uni.$u.toast('去前往PC网页端体验所有功能');
		}
	}
};
</script>

<style lang="scss">
.djsidj {
	position: relative;
	height: 166px;
	text-align: center;
	background-image: url(../../static/mine-bg.png);
}
</style>
